<template>
    <div id="app">
        <router-view></router-view>
    </div>
</template>

<script>
    export default {
        name: 'App',
        mounted() {
            this.beforeCreate()
        },
        methods: {
            beforeCreate() { // 浏览器刷新之后回到首页页面
                if (this.$router.path !== '/') {
                    this.$router.replace('/')
                }
            }
        }
    }
</script>
